package com.health.commons;

public class DataSourceContextHolder {

	private static final ThreadLocal<String> contextHolder = new ThreadLocal<String>(); // 线程本地环境

	// 设置数据源类型
	public static void setDataSourceName(String dataSourceName) {
		contextHolder.set(dataSourceName);
	}

	// 获取数据源类型
	public static String getDataSourceName() {
		return (String) contextHolder.get();
	}

}
